<container>
  <spacer size="5"></spacer>
  <row>
    <columns small="12">
      <h1>Summary for \{{StartDate}}</h1>
    </columns>
  </row>

  \{{#if HasSubmittedEvents}}
  \{{#if Blocked}}
  <row>
    <columns small="3">
      <callout>
        <b>Count</b>
        <h1 class="text-center">\{{Count}}</h1>
      </callout>
    </columns>
    <columns small="3">
      <callout>
        <b>Unique</b>
        <h1 class="text-center">\{{Unique}}</h1>
      </callout>
    </columns>
    <columns small="3">
      <callout>
        <b>New</b>
        <h1 class="text-center">\{{New}}</h1>
      </callout>
    </columns>
    <columns small="3">
      <callout>
        <b>Discarded</b>
        <h1 class="text-center alert">\{{Blocked}}</h1>
      </callout>
    </columns>
  </row>
  \{{else}}
  <row>
    <columns small="4">
      <callout>
        <b>Count</b>
        <h1 class="text-center">\{{Count}}</h1>
      </callout>
    </columns>
    <columns small="4">
      <callout>
        <b>Unique</b>
        <h1 class="text-center">\{{Unique}}</h1>
      </callout>
    </columns>
    <columns small="4">
      <callout>
        <b>New</b>
        <h1 class="text-center">\{{New}}</h1>
      </callout>
    </columns>
  </row>
  \{{/if}}
  \{{/if}}
  <row>
    <columns small="12">
      \{{#if HasSubmittedEvents}}
      <p>
        \{{#if Count}}
          The "\{{ProjectName}}" project had <strong>\{{Count}} total</strong>, <strong>\{{Unique}} unique</strong>, and <strong>\{{New}} new</strong> errors.
        \{{else}}
          Congrats! The "\{{ProjectName}}" project was exceptionless!
        \{{/if}}
        \{{#if Fixed}}
          Additionally, <strong>\{{Fixed}} errors</strong> that have been marked as fixed occurred in outdated instances of your application.
        \{{/if}}
      </p>

      <center>
        <button class="button radius" href="\{{BaseUrl}}/project/\{{ProjectId}}/error/dashboard">
          View Dashboard
        </button>
      </center>

      \{{#if Blocked}}
      <callout class="alert">
        <p>
          <strong>\{{Blocked}} events</strong> were discarded due to throttling.
          <a href="\{{BaseUrl}}/organization/\{{OrganizationId}}/upgrade">Upgrade now</a> to increase your limits.
          <a href="https://github.com/exceptionless/Exceptionless/wiki/Frequently-Asked-Questions#q-why-is-my-organization-throttled">Click here to learn more about throttling.</a>
        </p>

        <center>
          <button class="button radius alert" href="\{{BaseUrl}}/organization/\{{OrganizationId}}/upgrade">
              Upgrade Plan
          </button>
        </center>
      </callout>
      \{{/if}}

      <spacer size="5"></spacer>
      \{{#if MostFrequent}}
      <h5>Most Frequent</h5>
      <ul>
        \{{#each MostFrequent}}
          <li>
            <a href="\{{../BaseUrl}}/stack/\{{StackId}}">
              \{{#if IsRegressed}}<strong>[REGRESSED]</strong> \{{/if}}
              \{{#if TypeName}}<strong>\{{TypeName}}:</strong> \{{/if}}
              \{{Title}}
            </a>
          </li>
        \{{/each}}
          <li><a href="\{{BaseUrl}}/project/\{{ProjectId}}/error/frequent">View more...</a></li>
      </ul>
      \{{/if}}

      \{{#if Newest}}
      <h5>Newest</h5>
      <ul>
        \{{#each Newest}}
          <li>
            <a href="\{{../BaseUrl}}/stack/\{{StackId}}">
              \{{#if IsRegressed}}<strong>[REGRESSED]</strong> \{{/if}}
              \{{#if TypeName}}<strong>\{{TypeName}}:</strong> \{{/if}}
              \{{Title}}
            </a>
          </li>
        \{{/each}}
          <li><a href="\{{BaseUrl}}/project/\{{ProjectId}}/error/new">View more...</a></li>
      </ul>
      \{{/if}}

      \{{#if IsFreePlan}}
      <spacer size="5"></spacer>
      <p>
          You are currently on a free plan. If you would like to receive notifications for errors as they happen,
          <a href="\{{BaseUrl}}/organization/\{{OrganizationId}}/upgrade">upgrade to a paid plan</a>.
      </p>
      \{{/if}}
    \{{else}}
      <p class="lead">
          Unfortunately, it appears that your "\{{ProjectName}}" project has not yet been configured to send errors
          to <a href="https://exceptionless.com">Exceptionless</a>.
      </p>

      <spacer size="5"></spacer>
      <center>
        <button class="button radius" href="\{{BaseUrl}}/project/\{{ProjectId}}/configure">
            Configure Project
        </button>
      </center>

      <spacer size="5"></spacer>
      <p>
        Send us an email at <a href="mailto:support@exceptionless.io">support@exceptionless.io</a> if you have any questions or need help getting started.
      </p>
    \{{/if}}
    </columns>
  </row>
  <wrapper class="actions">
    <row>
      <columns small="12">
        <h5>Other Actions</h5>
        <ul>
          <li><a href="\{{BaseUrl}}/account/manage?projectId=\{{ProjectId}}&tab=notifications">Change your notification settings for this project</a></li>
        </ul>
      </columns>
    </row>
  </wrapper>
</container>

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "description": "\{{Subject}}",
  "potentialAction": {
    "@type": "ViewAction",
\{{#if HasSubmittedEvents}}
    "target": "\{{BaseUrl}}/project/\{{ProjectId}}/error/dashboard",
    "url": "\{{BaseUrl}}/project/\{{ProjectId}}/error/dashboard",
    "name": "View Dashboard"
\{{else}}
    "target": "\{{BaseUrl}}/project/\{{ProjectId}}/configure",
    "url": "\{{BaseUrl}}/project/\{{ProjectId}}/configure",
    "name": "Configure Project"
\{{/if}}
  },
  "publisher": {
    "@type": "Organization",
    "name": "Exceptionless",
    "url": "https://exceptionless.com",
    "url/googlePlus": "https://plus.google.com/111513069275546127753",
    "logo": "https://be.exceptionless.io/img/exceptionless-48.png"
  }
}
</script>